package com.xiaoluo.web.form;

import java.util.List;

/**
 * Project : XL-CD
 * Package : com.xiaoluo.web
 * Created by Willian.
 * Date  : 2016/1/19 17:18.
 */
public class TreeNode {

    private String text;
    private String icon;
    private String href;

    private Status state;

    public Status getState() {
        return state;
    }

    public void setState(Status state) {
        this.state = state;
    }

    public TreeNode(String text,String icon,String href,boolean state){
        if(text != null){
            this.text = text;
        }

        if(icon != null){
            this.icon = icon;
        }

        if(href != null){
            this.href = href;
        }

        this.state = new Status(state);
    }
    private List<TreeNode> nodes;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public List<TreeNode> getNodes() {
        return nodes;
    }

    public void setNodes(List<TreeNode> nodes) {
        this.nodes = nodes;
    }

    private class Status{
        private boolean selected;

        public Status(boolean selected){
            this.selected = selected;
        }

        public boolean isSelected() {
            return selected;
        }

        public void setSelected(boolean selected) {
            this.selected = selected;
        }
    }
}
